<!DOCTYPE html>
<html>
	<head>
		<title>API Sample</title>
		<meta name="content-type" content="text/html; charset=UTF-8">
		<script src="js/jquery-2.1.1.min.js"></script>
		<script>
$(document).ready(function(){
	var url = "api/sample";
	function doGet() {
		$.ajax({
			type: "GET",
			url: url,
			data: {
				test: "test"
			},
			success: function(result){
				$("body").append($("<p></p>").text("GET result = " + result));
				doPost();
			}
		});
	}
	function doPost() {
		$.ajax({
			type: "POST",
			url: url,
			data: {
				test: "test"
			},
			success: function(result){
				$("body").append($("<p></p>").text("POST result = " + result));
				doPut();
			}
		});
	}
	function doPut() {
		$.ajax({
			type: "PUT",
			url: url,
			data: {
				test: "test"
			},
			success: function(result){
				$("body").append($("<p></p>").text("PUT result = " + result));
				doDelete();
			}
		});
	}
	function doDelete() {
		$.ajax({
			type: "DELETE",
			url: url,
			data: {
				test: "test"
			},
			success: function(result){
				$("body").append($("<p></p>").text("DELETE result = " + result));
			}
		});
	}
	doGet();
});
		</script>
	</head>
	<body>
		This is my HTML page. <br>
	</body>
</html>